<img
  *ngIf="url && !hasError; else noSrc"
  [src]="url"
  class="icon dark-border-color"
  [ngStyle]="{ width: size + 'px', height: size + 'px' }"
  (error)="onError()"
  draggable="false"
/>

<ng-template #noSrc>
  <div
    class="circle"
    [ngStyle]="{
      'background-color': colour,
      width: size + 'px',
      height: size + 'px'
    }"
  >
    {{ name ? name[0] : '' }}
  </div>
</ng-template>
